<template>
	<view class="tips" :style="{paddingTop: paddingHeight + 'px'}">
		<nav-bar></nav-bar>
		<view class="container">
			<view class="title">
				代谢等级测量
			</view>
			<view class="sub-title">
				计算人体在代谢过程中利用的能量底物比例以了解代谢情况
			</view>
			<view class="cell" v-for="(item,index) in tips" :key="item.id">
				<view class="level" :style="{backgroundColor: item.bgColor}">
					{{ item.id  }}
				</view>
				<view class="info">
					<view class="i_t">
						{{ item.title }}
					</view>
					<view class="i_b">
						{{ item.subTitle }}
					</view>
				</view>
			</view>
			<view class="course" @click="goWebView">
				<view class="c-left">
					<view class="c-t">
						代谢等级测量教程
					</view>
					<view class="c-b">
						大多数观看此视频指南的人都可以更快地掌握该技术
					</view>
				</view>
				<u-image width="80rpx" :showMenuByLongpress="false" shape="circle" height="80rpx"
					src="http://oss.antaimedical.com/images/static/2024/08/66b07dade4b000d2c606b51d3upyoLq2EQvy6383f7f98771573af1a373223d388ae2.png"
					:lazy-load="true"></u-image>
			</view>
		</view>
		<view class="large_button" @click="$u.throttle(start, 1500)">开始测量</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				paddingHeight: uni.getStorageSync('navbarHeight'),
				tips: [{
					id: 1,
					bgColor: '#7CD37E',
					title: '燃烧脂肪供能',
					subTitle: '80%-100%燃脂--早晨目标'
				}, {
					id: 2,
					bgColor: '#78B2DD',
					title: '绝大多数燃烧脂肪供能',
					subTitle: '60%-80%燃脂--早晨目标'
				}, {
					id: 3,
					bgColor: '#9C70DE',
					title: '几乎同等燃烧脂肪和碳水化合物供能',
					subTitle: '40%-60%燃脂'
				}, {
					id: 4,
					bgColor: '#FFA168',
					title: '绝大多数燃烧碳水供能',
					subTitle: '60%-80%燃烧碳水供能'
				}, {
					id: 5,
					bgColor: '#F1C56B',
					title: '燃烧碳水供能',
					subTitle: '80%-100%燃烧碳水供能'
				}],

			}
		},
		methods: {
			start() {
				let parameter = {
					tag: 9
				}
				uni.navigateTo({
					url: `/pagesA/health/device/measure/prepare?params=${JSON.stringify(parameter)}`
				})
			},
			goWebView() {
				uni.navigateTo({
					url: '/pagesB/login/device/measure/webview?type=rer'
				})
			}
		}
	}
</script>


<style lang="scss">
	page {
		background-color: #FAFAFA;
		min-height: 100%;
	}
</style>
<style lang="scss" scoped>
	.tips {
		padding-bottom: 48rpx;

		.container {
			padding: 30rpx;

			.title {
				font-size: 48rpx;
				text-align: left;
				font-weight: 500;
				color: #333333;
			}

			.sub-title {
				font-size: 32rpx;
				color: #333333;
				line-height: 44rpx;
				text-align: left;
				padding: 16rpx 0 48rpx;
				letter-spacing: 1px;
			}

			.cell {
				width: 100%;
				height: 140rpx;
				margin-bottom: 16rpx;
				padding: 0 32rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				background-color: #fff;
				border-radius: 32rpx;
				color: #666666;

				.level {
					width: 44rpx;
					height: 44rpx;
					line-height: 44rpx;
					border-radius: 16rpx;
					color: #fff;
					font-size: 28rpx;
					text-align: center;
				}

				.info {
					flex: 1;
					padding-left: 32rpx;
					display: flex;
					flex-direction: column;
					justify-content: center;
					align-items: flex-start;

					.i_t {
						font-size: 28rpx;
						font-family: PingFangSC-Medium, PingFang SC;
					}

					.i_b {
						padding-top: 8rpx;
						font-size: 24rpx;
					}
				}
			}

			.course {
				width: 100%;
				padding: 24rpx 32rpx;
				margin-top: 16rpx;
				background: linear-gradient(139deg, #EFF6F9 0%, #ECEEFF 100%);
				border-radius: 16rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.c-left {
					flex: 1;
					padding-right: 58rpx;

					.c-t {
						font-weight: 500;
						font-size: 28rpx;
						color: #666666;
						text-align: left;
						padding-bottom: 12rpx;
					}

					.c-b {
						font-size: 24rpx;
						color: #666666;
						text-align: left;
					}
				}
			}
		}

		.large_button {
			margin: 160rpx auto 0;
		}
	}
</style>